public class slelct4 {
    public void select(int[] array){
        for (int i = 0; i <array.length ; i++) {
            int minIndex = i;
            for (int j = i+1; j < array.length; j++) {
                if(array[j]<array[minIndex]){
                    minIndex = j;
                }
            }
            int tem = array[i];
            array[i] = array[minIndex];
            array[minIndex] = tem;
        }
    }
}
